﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreEx.Database.Metadata;
using CoreEx.Common.Extensions;

namespace CoreEx.Database.MetaData.Implementation
{
    [Serializable]
    public class MetadataRepository : IMetadataRepository
    {
        private IList<TableInfo> _tables = new List<TableInfo>();

        public MetadataRepository(string name,IEnumerable<TableInfo> tables)
        {
            Name = name;
            
            tables.ForEach(t => _tables.Add(t));
        }

        public IList<TableInfo> Tables
        {
            get { return _tables; }
        }

        public string Name { get; private set; }
        
    }
}
